﻿import axios from "axios";

const searchImages = async (term) =>{
    const response = await axios.get('https://api.unsplash.com/search/photos',{
        headers:{
            Authorization:'Client-ID iNsQPdQpg5RqCvNAF0s9uPW8RQNj6PcIGGYXg8DclJE'
        },
        params:{
            query:term,
        },
    });

    return response.data.results;
};

export default searchImages;

